{extend name="index_layout"/}
{block name="main"}
<div class="layui-card">
    <div class="layui-card-header">确认函明细</div>
    <div class="layui-card-body">
        <div class="layui-form">
            <table class="layui-hide" id="table" lay-filter="table"></table>
            <script type="text/html" id="signUrl">
                {{#  if(d.sign_url != ''){ }}
                <div><img src="{{d.sign_url}}" style="width:120px;height:120px;"></div>
                {{#  } else { }}
                <div>暂未签名</div>
                {{#  } }}
            </script>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
layui.use('table', function() {
    var table = layui.table,
        $ = layui.$;
    table.render({
        elem: '#table',
        toolbar: '#toolbarDemo',
        url: '{:url("letterList")}',
        limit: 2,
        page: true,
        limits: [10,20,30,10000],
        cols: [
            [
                { field: 'id', title: 'ID'},
                { field: 'customer_name',title: '客户姓名'},
                { field: 'manager_name', title: '所属客户经理姓名'},
                { field: 'sign_url',title: '签名图片',templet:'#signUrl'},
                { field: 'status', title: '确认函状态' },
                { field: 'create_time',title: '确认函创建时间' },
                { field: 'update_time', title: '签名时间' }
            ]
        ],
    });
});
</script>
{/block}